home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / tdbredit.zip / README.TXT < prev    next >
Text File  |  1996-09-19  |  7KB  |  128 lines

  1. Here we are again
  2.  
  3. You just downloaded the version 1.2 of TDBRichEdit. A Delphi component which lets you edit 
  4. text inside a richedit control with some (not all yet) textformatting capabilities and save this text 
  5. directly into a database.
  6.  
  7. Installation
  8. Install this component like any other delphi component. Copy the files tdbredi.pas and tdbredit.res 
  9. into the same directory at your harddisk, choose the menu item "Component / Install", click the 
  10. "Add" button and choose the TDBREdit.pas or TDBREdit.dcu. Then click "OK". The component 
  11. will be installed into the DataControl page. If you have installed another language this component 
  12. will be installed in the language specific page.
  13. Usage
  14. The only things you have to do is defining a Blobfield (formatted memo for paradox) in your 
  15. database to which you connect the TDBRichEdit control via its properties Datasource and 
  16. Datafield and selecting a language via the property Language. Everything else happens 
  17. automatically unless you don┤t want to use any of the extended features which are described 
  18. below. Normally you can edit your text which is loaded from the database and format it by 
  19. rightclicking the mouse and selecting of one of  the formatting styles offered in the upcoming 
  20. popup menu or by using one of the shortcuts listed below.
  21.  
  22. English                    German
  23. Ctrl-B        Bold                Strg-F            Fett
  24. Ctrl-I        Italic                Strg-K            Kursiv
  25. Ctrl-U        Underline            Strg-U            Unterstrichen
  26. Ctrl-O        Strikeout            Strg-G            Durchgestrichen
  27. Ctrl-F        Font-Dialog            Strg-I            Schrift-Dialog
  28. Ctrl-P        Print                Strg-D            Drucken
  29.  
  30.  
  31. Extended features:
  32.  
  33. Language support
  34. This control supports the english and german language. You just select the language you are 
  35. programming in via the property language. Then you get the correct texts in the popup menu, the 
  36. hint panel, you can use the language specific shortcuts for the formatting styles and you get the 
  37. correct bitmap in your toolbar (see below). If you would like to support another language you can 
  38. easily adapt the sourcecode or send the texts and bitmaps to me. I will then include them into this 
  39. control.
  40.  
  41. Printing
  42. You can print the content of the RichEdit control via the context sensitive menu which open after 
  43. a right mouse click or via a toolbar button (see below). The property PrintCaption gives you the 
  44. possibility to enter a string which is displayed by the print manager of Windows while the print job 
  45. is spooled and printed.
  46.  
  47. Toolbar with speedbuttons
  48. You can define a toolbar (Tpanel-Object) in which the TDBRichEdit will display speedbuttons for 
  49. bold, italic, underlined and striked out text as well as a button for the font dialog. To use this 
  50. feature just select one of the offered panels in the property Toolbar. If you don┤t have any panel in 
  51. your form you can┤t use this feature. By selecting one of values ShButAlways or ShButOnEnter 
  52. of the property ShowButtons you can define if the speedbuttons should be displayed all the time 
  53. your TDBRichEdit is alive or only if it gets the focus. If you choose the second way the 
  54. speedbuttons will be deleted when the control looses the focus.
  55.  
  56. Speedbuttons in Floating window
  57. Another way to show the speedbuttons is by setting the property ShowFloatingWindow to true. 
  58. In this case every time the TDBRichEdit control gets the focus a floating window, which contains 
  59. the above described speedbuttons, will be created and display above the left corner of the control. 
  60. This window will be destroyed when the control looses the focus. The value of this property will 
  61. be ignored if you┤ve already defined a toolbar.
  62.  
  63. Select speedbuttons you need
  64. To Select the speedbuttons you need (e.g. only bold and italic) just select them with the property 
  65. VisibleBtns.
  66.  
  67. Joker, text macros
  68. Another interesting feature is to use Joker (text macros). By filling the stringlist of the property 
  69. Jokerlist you define Joker which can be replaced at runtime with another text. The syntax for the 
  70. property Jokerlist is: 
  71.         Joker=Value
  72. where Joker is the text macro and value is the text with which the joker will be replaced.
  73. For example: NAME=Helmut Tammen.
  74. The statements must be separated by a carriage return, line feed or in other words one Stringlist 
  75. item for each joker statement.
  76. The text of your TDBRichEdit control (which your customer entered) could than look like this: 
  77. "My name is {NAME}".
  78. The parenthesis are very important. They are the indicators for a Joker. Every string that is 
  79. included in parenthesis is searched in the jokerlist and replaced by the defined value.
  80. To replace the joker at runtime call the public procedure TDBRichEdit.ToggleJoker. This 
  81. procedure doesn┤t take any parameters. After calling this function the above entered text is 
  82. changed to "My name is Helmut Tammen". If you toggled to this "view mode" you cannot edit the 
  83. text. Every time a new record of the database is selected the control returns to the "joker mode".
  84. In addition there is a new event OnJokerstateChanged which is called everytime the Jokerstate 
  85. changes. Here you can for example toggle the text of the button which you created to toggle the 
  86. joker mode.
  87. To get the current jokerstate there is the "readonly and only at runtime" property Jokerstate 
  88. which returns stJoker if the Jokers are displayed and stValue if the values are currently displayed.
  89.  
  90. License
  91. This component is freeware. You are allowed to give this tool (the .DCU and all documentation 
  92. files) to third people. But you are not allowed to give the source code to any other.
  93.  
  94. Registration
  95. If you like this control or/and you would like to get the source code please register it for the price 
  96. of $10 (US). To do so just GO SWREG. The registration-ID is: #13089. 
  97. If you register you will not only get the source code but also the next version free of any charge.
  98. Notice: At the moment I only distribute this software via Compuserve. But if you are interested in 
  99. this component and would like another way of distribution contact me via e-mail (see below).
  100. The more people register the more will I be motivated to do further development.
  101.  
  102. Disclaimer
  103. When I wrote this software I tried to do no programming errors and I and some other 
  104. programmers tested it. But I can┤t guarantee that this component is free of bugs. So you should 
  105. know that you use this software as it is. In spite of this you should also know that I try to fix all 
  106. the bugs that are reported to me.
  107.  
  108. What does the future bring
  109. For the future I┤ve planned the following features:
  110.   Implementing paragraph formatting (Enumeration, indentation, alignment, ...).
  111.   Implementing tabs and a ruler.
  112.   Enhancement of the joker implementation (creating pattern letters).
  113.   Including OLE Objects.
  114.   Writing a help file.
  115.   Implementation of the new component RichEdit-View which encloses a ruler, a toolbar and 
  116. the RichEdit itself and should then look almost like a little text program.
  117.  
  118. If you have any suggestions or find any bugs please let me know. I will upload new versions 
  119. of this control from time to time.
  120.  
  121.  
  122. I hope this control will help you
  123. It┤s not the last version.
  124.  
  125. Helmut Tammen
  126. Compuserve: 100712,3030
  127. e-mail: 100712.3030@compuserve.com
  128.